package com.acyouzi.leetcode.string;

/**
 * 17/9/11 15:01
 *
 * @author sunxu
 */
public class NthDigit {
  public int findNthDigit(int n) {
    StringBuilder builder = new StringBuilder();
    int i = 1;
    while (builder.length() < n){
      builder.append(Integer.toString(i));
    }
    return builder.charAt(n-1) - '0';
  }

  public static void main(String[] args) {

  }
}
